import { createRouter, createWebHistory } from 'vue-router'
import HelloWorld from '@/components/HelloWorld.vue'
import FirstComponent from '@/components/chapters/4component/demo1.vue'
import ParentComponent from '@/components/chapters/4component/parent.vue'
import SlotParentComponent from '@/components/chapters/4component/parent-slot.vue'
import TestComponent from '@/components/chapters/4component/test.vue'

import ComponentEvent from '@/components/chapters/41component/componentEvent.vue'
 import Slotbak from '@/components/chapters/41component/slotbak.vue'
 import DynaComp from '@/components/chapters/41component/dynaComp.vue'

 import AxiosComponent from '@/components/chapters/8axios/axios.vue'
import AxiosLjqComponent from '@/components/chapters/8axios/axios_ljq.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HelloWorld
    },
    {
      path: '/c4_first_component',
      name: 'FirstComponent',
      component: FirstComponent
    },
    {
      path: '/c4_parent_component',
      name: 'ParentComponent',
      component: ParentComponent
    },
    {
      path: '/c7_slot_component',
      name: 'SlotParentComponent',
      component: SlotParentComponent
    },
    {
      path: '/dynaComp',
      name: 'DynaComp',
      component: DynaComp
    },
    {
      path: '/slotbak',
      name: 'Slotbak',
      component: Slotbak
    },
    {
      path: '/componentEvent',
      name: 'ComponentEvent',
      component: ComponentEvent
    },
    {
      path: '/c8_axios_component',
      name: 'AxiosComponent',
      component: AxiosComponent
    },
    {
      path: '/c8_axios_ljq_component',
      name: 'AxiosLjqComponent',
      component: AxiosLjqComponent
    }
  ]
})

export default router
